/* Copyright (C) 2003, Charles Wang.
 * Author:  Charles Wang <charles@linux.net.cn>
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANT; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public LIcense for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, 59 Temple
 * Place - Suite 330, Boston, MA 02111-1307, USA.
 */
#ifndef __TESTSHOW_H__
#define __TESTSHOW_H__

#ifdef TEST

#include "mxml.h"

typedef void (*outfunc)(int, const char *, ...);

#define  SHOWXML(of, fd, mxn)        showxml((of), (fd), (mxn))
#define  SHOWTEXT(of, fd, fn)        showtext((of), (fd), (fn))
#define  SHOWBIN(of, fd, fn, limit)  showbin((of), (fd), (fn), (limit))
#define  SHOWFILE(of, fd, fn)        showfile((of), (fd), (fn))
#define  SHOWDIR(of, fd, fn)         showdir((of), (fd), (fn))
#define  SHOWTREE(of, fd, fn)        showtree((of), (fd), (fn))

void showxml(outfunc of, int fd, const mxml_node_t *mxn);
void showtext(outfunc of, int fd, const char *filename);
void showbin(outfunc of, int fd, const char *filename, int limit);
void showfile(outfunc of, int fd, const char *filename);
void showdir(outfunc of, int fd, const char *filename);
void showtree(outfunc of, int fd, const char *filename);

#else

#define  SHOWXML(of, fd, mxn)        ((void)0)
#define  SHOWTEXT(of, fd, fn)        ((void)0)
#define  SHOWBIN(of, fd, fn, limit)  ((void)0)
#define  SHOWFILE(of, fd, fn)        ((void)0)
#define  SHOWDIR(of, fd, fn)         ((void)0)
#define  SHOWTREE(of, fd, fn)        ((void)0)

#endif

#endif
